{% extends "base2.html" %}
{% load staticfiles %}

  {% block private_css %}
    <link href="{% static 'css/select.css' %}" rel="stylesheet">
  {% endblock %}
  {% block content %}
    <!-- contain -->
    <div id="wapper"> 
        <div id="welcomePane">
          <div id="userImg" style="background-image:url({% static 'img/userDefault.png' %})"></div>
          <div id="userInfo"> 
       	    <br>
       	    <h3>{{ username }}</h3>
            <br>
       	    <h4>欢迎</h4>
       	    <br>
             {{user}}
             <br>
             {{chat}}
          </div>

          <form id="enter" action="/Accounts/chat/" method="GET"><button type="submit" class="form-control btn btn-danger center" >开始聊天</button></form>
        </div>
    </div> <!-- wapper -->
  {% endblock %}
  
    {% block other_script %}
    <script type="text/javascript">
      $("#enter").click(function(){
          var xmlHtpRq = new XMLHttpRequest();
          url = "/Accounts/main/";
          xmlHtpRq.open('GET', url, true);
          xmlHtpRq.send(null);
      });

    </script>
    {% endblock %}
    